﻿
@{
    ViewBag.Title = "修改商户营业时间";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@using Mate.Framework.Extensions
@model Mate.Db.Model.Merchant.mp_merchant_opentime
@section styles{
    <link href="~/bootstrap/plugins/jquery-file-upload/css/jquery.fileupload.css" rel="stylesheet" />
    <link href="~/plugins/laydate/theme/default/laydate.css" rel="stylesheet" />
}

@section scripts{
    <script src="~/bootstrap/plugins/jquery-validation/dist/jquery.validate.min.js"></script>
    <script src="~/bootstrap/plugins/jquery-validation/dist/additional-methods.min.js"></script>
    <script src="~/bootstrap/scripts/custom/form-validation.js" charset="gbk"></script>

    <script src="~/plugins/layui/layui.js"></script>
    <script src="~/plugins/laydate/laydate.js"></script>

    <script src="~/js/admin.js?v=1.0"></script>
    <script language="javascript" type="text/javascript">
        $(function () {
            var rules = {
                merchantopenbegin: {
                    required: true
                },
                merchantopenend: {
                    required: true
                }

            };
            FormValidation.BasicValidation(rules);

        });
        layui.laydate.render({ elem: '#merchantopenbegin', type: 'time', format: 'HH:mm' });
        layui.laydate.render({ elem: '#merchantopenend', type: 'time', format: 'HH:mm' });
    </script>
}

<ul class="page-breadcrumb breadcrumb">
    <li>
        <a href="@Url.Action("Index","Merchant")">
            商户管理
        </a>
        <i class="fa fa-angle-right"></i>
    </li>
    <li>
        <a href="@Url.Action("Index","MerchantOpentime")">
            商户营业时间
        </a>
        <i class="fa fa-angle-right"></i>
    </li>
    <li>
        修改商户营业时间
    </li>
</ul>

<div class="row">
    <div class="col-md-12">
        <div class="portlet-body form">
            <!-- BEGIN FORM-->
            @using (Html.BeginForm("Edit", "MerchantOpentime", FormMethod.Post, new { @class = "form-horizontal", @id = "form_ff_validation", @novalidate = "novalidate" }))
            {
                <div class="form-body">
                    @Html.TextFor("商户营业开始时间", "merchantopenbegin", value: Model.merchantopenbegin)
                    @Html.TextFor("商户营业结束时间", "merchantopenend", value: Model.merchantopenend)

                    @Html.RadioFor("状态", "is_open", new List<KeyValuePair<string, string>>()
                                                    {
                                                        new KeyValuePair<string, string>("1","启用"),
                                                        new KeyValuePair<string, string>("2","禁用")
                                                    },selectValue:Model.is_open.ToString())
                    @Html.HiddenFor(x => x.merchantid)
                </div>
                <div class="form-actions fluid">
                    <div class="col-md-offset-3 col-md-9">
                        @Html.HiddenFor(x => x.id)
                        <button class="btn green" type="button" onclick="admin.AddSubmit('@Url.Action("Index")?merchantId=@Model.merchantid')"> 提交 <i class="fa fa-check"></i> </button>
                        <a class="btn default" role="button" href="@Url.Action("Index")?merchantId=@Model.merchantid"> 返回 <i class="fa fa-reply"></i></a>
                    </div>
                </div>
            }
            <!-- END FORM-->
        </div>
    </div>
    <!-- END VALIDATION STATES-->
</div>
